package com.lijiajia.cloud.gate;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * GateApp
 *
 * @author lijiajia
 * @since 2019-04-04
 */
@EnableDiscoveryClient
@SpringBootApplication
public class GateApp {
    public static void main(String[] args) {
        SpringApplication.run(GateApp.class, args);
    }

    // @Bean
    // public RouteLocator routes(RouteLocatorBuilder builder) {
    //
    //     return builder.routes()
    //             .route("cloud-auth",
    //                     route ->
    //                             route.path("/test", "/oauth")
    //                                     .filters(filter ->
    //                                             filter.modifyResponseBody(
    //                                                     Object.class,
    //                                                     Result.class,
    //                                                     (exchange, data) -> Mono.just(Result.success(data)))
    //                                     )
    //                                     .uri("lb://cloud-auth")
    //
    //             )
    //             .build();
    // }
}
